
#include "../cfg/prj.h"





//handle hardware info numbers
#define DIAG_HARDWAREINFO                     0
//handle vehicle ID numbers
#define DIAG_HANDLEVIN                        0
//handle teach-in
#define DIAG_TEACHIN                          1
//handle parameters
#define DIAG_PARAMETERS                       1
//handle SERVICE access                       
#define DIAG_SERVICE                          1
//handle EOPL access                          
#define DIAG_EOPL                             1


// Drive
// request codes
#define REQ_TEACH_STEER_START                  0x20
#define REQ_TEACH_STEERL                       0x21
#define REQ_TEACH_STEERR                       0x22
#define REQ_TEACH_STEER_NEUTRAL                0x23
#define REQ_TEACH_ACCELERATOR1_START           0x24
#define REQ_TEACH_ACCELERATOR1_MIN             0x25     
#define REQ_TEACH_ACCELERATOR1_MAX             0x26   
#define REQ_TEACH_ACCELERATOR2_START           0x27
#define REQ_TEACH_ACCELERATOR2_MIN             0x28     
#define REQ_TEACH_ACCELERATOR2_MAX             0x29  
#define REQ_TEACH_LIFT_POTENTIOMETER_START     0x2A
#define REQ_TEACH_LIFT_POTENTIOMETER_MIN       0x2B     
#define REQ_TEACH_LIFT_POTENTIOMETER_MAX       0x2C   


// drive and lift
// response codes

#define RSP_OK                                 0  ///< remote
#define RSP_BUSY                               1  ///< remote is busy
#define RSP_ERRUNKNOWN                         2  ///< error: request not known to application
#define RSP_ERRTIMEOUT                         3  ///< error: communication timeout
#define RSP_ERRNOTREADY                        4  ///< error: not ready for new request
#define RSP_ERRSPURIOUS                        5  ///< error: "idle" request was triggered (makes no sense)
#define RSP_ERRNOCOMM                          6  ///< error: RM_REMOTE mode but no Peer configured
#define RSP_USER                              32  ///< list of user-defined response codes starts here

#define RSP_OUTOFRANGE                        0x31
#define RSP_IMPLAUSIBLE                       0x32
#define RSP_TRACACTIVE                        0x33
#define RSP_NOHBRAKE                          0x34
#define RSP_NOFBRAKE                          0x35
#define RSP_JOYOUTOFRANGE                     0x36
#define RSP_HBRAKEON                          0x37
#define RSP_FBRAKEON                          0x38
#define RSP_LIFTACTIVE                        0x39
#define RSP_WRONGORDER                        0x40
#define RSP_PRESSACCUHI                       0x41

#define RSP_NOSEAT                            0x43
#define RSP_PEDAL                             0x44
						                      
#define RSP_JOYNOTNEUTRAL                     0x45
						                      
#define RSP_NOSUCCESS                         0x46
#define RSP_UC2NOSUCCESS                      0x47
						                      
#define RSP_TRUCKTYPE                         0x48
#define RSP_STEERACTIVE                       0x49

// drive and lift
// Parking brake is not fitted on KCPC
#define EQU_NOT_FITTED                        (0)
#define EQU_FITTED                            (1)
#define CC_PARKING_BRAKE                      EQU_NOT_FITTED

/**
\page RM_xxx
!!!request modes
\n
these macros define from what interface the request came:
- RM_FROMMLI
- RM_FROMKWP
- RM_FROMDDIAG
- RM_FROMAPP
- RM_TESTCOND
*/

#define RM_FROMPEER                           1                ///< request came from Peer
#define RM_FROMKWP                            2                ///< request came from KWP2000
#define RM_FROMDDIAG                          3                ///< request came from DDiag
#define RM_FROMAPP                            4                ///< request came from Application
#define RM_TESTCOND                           5                ///< do not process request, just test conditions

						                      
